package com.qumitech.visualnovel.datasource.console;

import com.qumitech.visualnovel.model.dao.console.AccountLoginStatistics;
import com.qumitech.visualnovel.pubdef.dto.accountstatistic.AccountStatisticDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AccountLoginStatisticsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AccountLoginStatistics record);

    int insertSelective(AccountLoginStatistics record);

    AccountLoginStatistics selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AccountLoginStatistics record);

    int updateByPrimaryKey(AccountLoginStatistics record);


    List<AccountStatisticDTO> getLine(@Param("type") String type,
                                      @Param("channel") String channel,
                                      @Param("version") String version,
                                      @Param("system") String system,
                                      @Param("gameType") String gameType,
                                      @Param("appName") String appName,
                                      @Param("startTime") String startTime,
                                      @Param("endTime") String endTime,
                                      @Param("countColumn") String countColumn,
                                      @Param("gender") Integer gender);

    List <AccountLoginStatistics> getList(@Param("channel") String channel,
                                          @Param("version") String version,
                                          @Param("system") String system,
                                          @Param("gameType") String gameType,
                                          @Param("appName") String appName,
                                          @Param("startTime") String startTime,
                                          @Param("endTime") String endTime,
                                          @Param("offset") Integer offset,
                                          @Param("limit") Integer limit,
                                          @Param("orderType") String orderType,
                                          @Param("orderBy") String orderBy,
                                          @Param("countColumn") String countColumn
                                          );

    Integer getCount(@Param("channel") String channel,
                     @Param("version") String version,
                     @Param("system") String system,
                     @Param("gameType") String gameType,
                     @Param("appName") String appName,
                     @Param("startTime") String startTime,
                     @Param("endTime") String endTime);

  Integer getDashboardLoginNum(@Param("system") String system);
}